package com.beiding.workordersystem.orders.generalorder.dao;

import com.beiding.workordersystem.common.dao.ExpandBaseMapper;
import com.beiding.workordersystem.orders.generalorder.entity.GeneralOrder;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface GeneralOrderDao extends ExpandBaseMapper<GeneralOrder> {

    GeneralOrder getCreatorIdAndStatus(String id);

    Integer getStatus(String id);

    void refuse(@Param("id") String id,@Param("reason") String reason);

    void pass(String id);

    void updateStatus(@Param("id") String id,@Param("status") int status);

    void designate(@Param("id") String id,@Param("type") Integer type);

    GeneralOrder getStatusType(String id);

    GeneralOrder getStatusTypePrincipalId(String orderId);

    void setPrincipalId(@Param("id")String id,@Param("principalId") String principalId);

    void removePrincipalId(String orderId);

}
